#include <stdio.h>
int main(int argc , const char *argv[])
{
      unsigned char num=0xa8, ret;
      //  将第三位(从右向左开始数，位数从1开始)变为 1 
      ret=num|0x40;
      printf("第三位变为一后：%#x\n",ret);
      //  将第六位变为 0
      ret=num&0xdf;
       printf("第六位变成0后: %#x\n",ret);
       //高四位和低四位互换
       ret=(num&0xdf)|0x8a;
       printf("换位后%#x\n",ret);
       

       return 0;
}
//1010 1000
//1101 1111
//1000 1000
//1000 1010
//1000 1010